<!-- 项目流程 -->
<template>
  <div>
    <devArticle>
      <card>
        <Row style="padding-bottom: 10px">
          <Col span="2">
          <h3>项目流程单</h3>
          </Col>
          <Col span="1" style="color:#999"> 返回>>
          </Col>
        </Row>
        <el-table :data="tableData1" :span-method="objectSpanMethod" @cell-click="abc" border style="width: 100%">
          <el-table-column label="项目流程单" align="center">
            <el-table-column prop="flow" label="流程" align="center">
            </el-table-column>
            <el-table-column prop="opera" label="操作" align="center">
            </el-table-column>
            <el-table-column prop="record" label="操作记录" align="center">
            </el-table-column>
            <el-table-column label="功能" align="center">
              <template slot-scope="scope">
                <el-button size="mini" type="primary">打印</el-button>
              </template>
            </el-table-column>
          </el-table-column>
        </el-table>
      </card>
    </devArticle>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData1: [{
        flow: '创建项目',
        opera: '保存',
        record: '2018-07-13 09:31',
      }, {
        flow: '创建项目',
        opera: '提交',
        record: '',
      }, {
        flow: '资料收集',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '资料收集',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '现场踏勘',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '现场踏勘',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '环境质量及检测',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '环境质量及检测',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '报告编审及审核',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '报告编审及审核',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '报告送审',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '报告送审',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '技术评估',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '技术评估',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '报告报批',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '报告报批',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '报告公示',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '报告公示',
        opera: '提交',
        record: '',
        function: '功能',
      }, {
        flow: '报告存档',
        opera: '保存',
        record: '',
        function: '功能',
      }, {
        flow: '报告存档',
        opera: '提交',
        record: '',
        function: '功能',
      }]
    }
  },
  methods: {
    //点击每行得到行中文字
    abc(row, event) {

      console.log(row.flow)
      if (row.flow == "创建项目") {
        this.$router.push("/My/createProgram");
      } 
    },
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      if (columnIndex === 0) {
        if (rowIndex % 2 === 0) {
          return {
            rowspan: 2,
            colspan: 1
          };
        } else {
          return {
            rowspan: 0,
            colspan: 0
          };
        }
      }
    }
  }

}

</script>
<style>


</style>
